* (bug 672) Add MathAfterTexvc hook
* Update to Piedmontese localization (pms)
* dumpBackup can optionally compress via dbzip2
+* (bug 2483) Run link updates on change via XML import
== Compatibility ==
if( $pageId == 0 ) {
# must create the page...
$pageId = $article->insertOn( $dbw );
+ $created = true;
+ } else {
+ $created = false;
}
# FIXME: Check for exact conflicts
'minor_edit' => $this->minor,
) );
$revId = $revision->insertOn( $dbw );
- $article->updateIfNewerOn( $dbw, $revision );
+ $changed = $article->updateIfNewerOn( $dbw, $revision );
+ if( $created ) {
+ wfDebug( __METHOD__ . ": running onArticleCreate\n" );
+ Article::onArticleCreate( $this->title );
+ } else {
+ if( $changed ) {
+ wfDebug( __METHOD__ . ": running onArticleEdit\n" );
+ Article::onArticleEdit( $this->title );
+ }
+ }
+ if( $created || $changed ) {
+ wfDebug( __METHOD__ . ": running edit updates\n" );
+ $article->editUpdates(
+ $this->getText(),
+ $this->getComment(),
+ $this->minor,
+ $this->timestamp,
+ $revId );
+ }
+
return true;
}